<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>

<!-- Bootstrap core CSS -->
<link href="<%=basePath%>bootstrap3/css/bootstrap.min.css"
	rel="stylesheet">
<link href="data:text/css;charset=utf-8,"
	data-href="<%=basePath%>bootstrap3/css/bootstrap-theme.min.css"
	rel="stylesheet" id="bs-theme-stylesheet">
<link href="<%=basePath%>bootstrap3/css/docs.min.css" rel="stylesheet">

<script src="<%=basePath%>bootstrap3/js/jquery.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/bootstrap.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/docs.min.js"></script>

<script src="<%=basePath%>bootstrap3/js/ie10-viewport-bug-workaround.js"></script>

<style type="text/css">
#head {
	height: 100px;
	width: 100%;
	background: #843534;
	margin-left: auto;
	margin-right: auto;
}
</style>
<link rel="stylesheet" type="text/css"
	href="http://www.jeasyui.net/Public/js/easyui/themes/default/easyui.css">
<script type="text/javascript"
	src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="http://www.jeasyui.net/Public/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css"
	href="http://www.jeasyui.net/Public/js/easyui/demo/demo.css">
<script type="text/javascript"
	src="http://www.jeasyui.net/Public/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
	function comTime() {
		var start = $('#start').datebox('getValue');
		var arr = start.split("/");
		var starttime = new Date(arr[2], arr[0], arr[1]);
		console.info(starttime.toString());
		var end = $('#end').datebox('getValue');
		var arrs = end.split("/");
		var lktime = new Date(arrs[2], arrs[0], arrs[1]);
		console.info(end);
		if (lktime.getTime() <= starttime.getTime()) {
			alert('开始时间大于或者等于结束时间，请检查');
			return false;
		} else {
			return true;
		}

	}
</script>
</head>

<body>
	<div id="head">
		<div style="height: 10px;"></div>
		<div
			style="height: 100px; width: 60%; margin-left: auto; margin-right: auto;">
			<h1>
				<span class="glyphicon glyphicon-th-list"></span>&nbsp;&nbsp;&nbsp;&nbsp;你&nbsp;的&nbsp;账&nbsp;单
			</h1>
		</div>
	</div>
	<div style="height: 25px;"></div>
	<form action="<%=basePath%>netuser/netrechange.action">
		<table>
			<tr>
				<td><font size="5">开始时间:&nbsp;&nbsp;&nbsp;</font></td>
				<td><input class="easyui-datebox" value="1/1/2016" id="start"
					name="start" style="height: 33px; width: 200px;"></td>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td><font size="5">结束时间:&nbsp;&nbsp;&nbsp;</font></td>
				<td><input class="easyui-datebox" value="1/1/2016" id="end"
					name="end" style="height: 33px; width: 200px;"></td>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td>
					<button type="submit" class="btn btn-success"
						onclick="return comTime();">查&nbsp;&nbsp;询</button>
				</td>
				<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td><a href="<%=basePath%>netuser/userNowPay.action"
					type="button" class="btn btn-danger">立&nbsp;&nbsp;即&nbsp;&nbsp;冲&nbsp;&nbsp;值</a>
				</td>
			</tr>
		</table>
	</form>
	<div style="height: 30px;"></div>
	<div align="center">
		<table class="table table-hover">
			<thead>
				<c:if test="${sessionScope.beforeBill!=null}">
					<tr>
						<th><font size="4"><span
								class="glyphicon glyphicon-ok"></span></font></th>
						<th><font size="4">缴费时间</font></th>
						<th><font size="4">缴费金额(￥)</font></th>
						<th><font size="4">缴费方式</font></th>
						<th><font size="4">负责人</font></th>
						<th><font size="4">交给？</font></th>
					</tr>
				</c:if>
			</thead>
			<tbody>
				<c:forEach items="${sessionScope.beforeBill}" var="rechange"
					varStatus="re">
					<tr>
						<th><font size="4">${re.index+1} </font></th>
						<th><font size="4"><fmt:formatDate
									value="${rechange.uptime}" pattern="yyyy年MM月dd日HH时mm分" /> </font></th>
						<th><font size="4">${rechange.upmoney}</font></th>
						<th><font size="4"> <c:if test="${rechange.opid!=0}">人工缴费</c:if>
								<c:if test="${rechange.opid==0}">网上缴费</c:if>
						</font></th>
						<th><font size="4">${rechange.opname}</font></th>
						<th><font size="4"><c:if
									test="${rechange.paypayfriend==2}">朋友</c:if> <c:if
									test="${rechange.paypayfriend==1}">自己</c:if></font></th>
					</tr>
				</c:forEach>
				<tr>
					<c:if test="${sessionScope.allBillMoney!=null}">
						<th><font size="4">合计：</font></th>
						<th><font size="4">${sessionScope.allBillMoney}</font>
					</c:if>
					</th>
				</tr>
			</tbody>
		</table>
	</div>

</body>

</html>